x86/mem_sharing: enable mem_sharing on first memop
authorTamas K Lengyel <tamas.lengyel@intel.com>
Fri, 24 Jan 2020 09:28:22 +0000 (10:28 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Jan 2020 09:28:22 +0000 (10:28 +0100)
commit72f8d45d69b84e2f5c76180fe046ecca1b2f99ea
tree0492ec7e756ac4021bda8c6b0a1b0957f5d0914f
parent96d4621f96bfdac97b85c3a278b4b51bcdd6f272
x86/mem_sharing: enable mem_sharing on first memop

It is wasteful to require separate hypercalls to enable sharing on both the
parent and the client domain during VM forking. To speed things up we enable
sharing on the first memop in case it wasn't already enabled.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm/mem_sharing.c